![]() |
FSWriteFork |
||||
Header: | Files.h | Carbon status: | Supported | |
Writes data to an open fork.
OSErr FSWriteFork ( SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset, ByteCount requestCount, void *buffer, ByteCount *actualCount );
The reference number of the fork to write to.
The base location for the start of the write. The caller can hint to the File Manager whether the data being written should or should not be cached. Set the appropriate bits in positionMode. See
The offset from base location for the start of the write.
The number of bytes to write.
A pointer to the data to write.
On return, a pointer to the number of bytes actually written. this parameter is optional; if you don’t want it, set actualCount to NULL. The actualCount will be equal to requestCount unless there was an error during the write operation.
A result code. If there is not enough space on the volume to write requestCount bytes, then dskFulErr is returned.
Data is written starting at the position specified by positionMode and positionOffset. The call will attempt to write requestCount bytes from the buffer pointed at by the buffer parameter.
The fork’s current position is set to point immediately after the last byte written (that is, the initial position plus actualCount).
You can open the fork using the FSOpenFork call.
Supported in Carbon. Available in Mac OS 9, and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)